<template>
  <button
    :class="{
      btn: true,
      'btn-primary': props.type === 'primary',
      'btn-gray': props.type === 'gray'
    }"
    :style="props.style">
    <slot></slot>
  </button>
</template>

<script setup lang="ts">
const props = defineProps({
  type: String,
  style: {
    type: [Object, String]
  }
})
</script>

<style lang="less" scoped>
.btn {
  // width: 160px;
  // height: 40px;
  display: inline-block;
  width: 158px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: 1px solid #b0b0b0;
  font-size: 14px;
  line-height: 38px;
  text-align: center;
  color: #b0b0b0;
  cursor: pointer;
  transition: all 0.4s;
  &:hover {
    background: #fff;
    border-color: #000;
    color: #000;
  }
}
.btn-primary {
  background: #ff6700;
  border-color: #ff6700;
  color: #fff;
  &:hover {
    background: #f25807;
    border-color: #f25807;
    color: #fff;
  }
}
.btn-gray {
  background: #b0b0b0;
  border-color: #b0b0b0;
  color: #fff;
  &:hover {
    background: #757575;
    border-color: #757575;
    color: #fff;
  }
}
</style>
